from flask import Flask
import config
from exts import db
from models import UserModel
from blueprints.auth import auth_bp
from flask_migrate import Migrate

app = Flask(__name__)
# 绑定引入配置文件
app.config.from_object(config)

# 数据库对象和APP进程绑定
db.init_app(app)

# 数据库同步
migrate = Migrate(app, db)

# 蓝图对象绑定APP
app.register_blueprint(auth_bp)


@app.route('/')
def hello_world():  # put application's code here
    return 'Hello World!'


if __name__ == '__main__':
    app.run()
